package com.mark.springsecurity.dto.resp;

import com.mark.springsecurity.domain.SysAuthority;
import lombok.*;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysAuthorityDto {

    private Long id;

    private String name;

    private String value;

    public static SysAuthorityDto build(SysAuthority sysAuthority) {
        return SysAuthorityDto.builder()
                .id(sysAuthority.getId())
                .name(sysAuthority.getName())
                .value(sysAuthority.getValue())
                .build();
    }
}
